//
//  Rank1.m
//  FloatClouds
//
//  Created by 黄威 on 16/09/01
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "Rank1.h"
#import "Rank1Cigarettes.h"

@implementation Rank1

-(void)setValue:(id)value forKey:(NSString *)key{
    
    [super setValue:value forKey:key];
    
    if ([key isEqualToString:@"cigarettes"]) {
        
        NSMutableArray *array = [NSMutableArray array];
        
        for (NSDictionary *dic in value) {
            
            Rank1Cigarettes *cigarettes = [Rank1Cigarettes modelWithDic:dic];
            
            [array addObject:cigarettes];
            
        }
        
        _cigarettes = array;
        
    }
    
    
    
}

@end
